package com.jiyejia.activity;

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import com.jiyejia.R;
import com.jiyejia.model.Order;

import java.util.ArrayList;

/**
 * 搜索界面
 * Created by zhoucong on 13-6-17.
 */
public class SearchActivity extends Activity implements View.OnClickListener{
    private EditText mEdittext;
    private Button mSearch;
    private ListView mSearchListView;
    private ArrayList<Order> mList;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.search);

    }
    private void initView(){
        mEdittext = (EditText) findViewById(R.id.edittext);
        mSearch = (Button) findViewById(R.id.searchbutton);
        mSearch.setOnClickListener(this);
        mSearchListView = (ListView) findViewById(R.id.searchoutlist);
        mSearchListView.setVisibility(View.INVISIBLE);

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.searchbutton:
                new SearchTask().execute("订单");
                break;
            default:
                break;
        }
    }
    private class SearchTask extends AsyncTask<String,Void,Void>{

        @Override
        protected Void doInBackground(String... voids) {
            return null;
        }

        @Override
        protected void onPostExecute(Void aVoid) {
            super.onPostExecute(aVoid);
            mSearchListView.setVisibility(View.VISIBLE);
        }
    }
}
